package com.wtwd.device.service;

import com.wtwd.device.model.entity.UpgradeFile;
import com.wtwd.device.model.entity.UpgradeStatement;

import java.util.List;
import java.util.Map;

public interface UpgradeService {
    /**
     * 新增一笔升级记录
     *
     * @param upgradeFile
     * @return
     */
    Integer addUpgradeInfo(UpgradeFile upgradeFile);

    /**
     * 查询升级信息列表
     *
     * @param userId
     * @return
     */
    Map<String, Object> getUpgradeInfoList(Long userId, String watchId, Integer curPage, Integer pageSize);

    /**
     * 新增一笔升级说明
     *
     * @param data
     * @return
     */
    Integer addUpgradeStatement(UpgradeStatement data);

    /**
     * 修改一笔升级说明
     *
     * @param data
     * @return
     */
    Integer modifyUpgradeStatement(UpgradeStatement data);

    /**
     * 删除一笔升级说明
     *
     * @param id
     * @return
     */
    Integer deleteUpgradeStatement(Integer id, String watchId);


    /**
     * 删除一笔升级说明
     *
     * @return
     */
    List<Map<String, Object>> getLanguageList();


    /**
     * 根据升级包记录id获取升级说明列表
     *
     * @return
     */
    List<Map<String, Object>> getUpgradeStatementListByUpgradeId(Integer upgradeId);

    /**
     * 根据升级包记录id查找所有的升级说明
     *
     * @return
     */
    List<UpgradeStatement> getUpgradeStatementByUpgradeId(Integer upgradeId);

    /**
     * 根据升级版本和手表id去找一条记录
     */
    Integer getUpgradeByWatchIdAndVersion(String watchId, String version);

    /**
     * 根据手表id模糊查询手表id列表
     */
    List<String> getWatchIdList(String key, Long userId);

    Integer deleteUpgrade(Integer id);

    /**
     * 根据watchId查询升级包文件
     *
     * @param watchId
     * @return
     */
    List<UpgradeFile> getUpgradesByWatchId(String watchId);
}
